<template>
    <div class="searchTop">
        <form action="/">
            <van-search v-model="value" show-action placeholder="小米" @search="onSearch(msg)" @cancel="onCancel" />
        </form>
    </div>
</template>

<script>

export default {
    data() {
        return {
            hotword: [],
            value: '',
        };
    },
    props: ['msg'],
    methods: {
        onSearch(val) {
            //   Toast(val);
            this.$router.push({ path: './searchresult', query: { key: val } })
        },
        onCancel() {
            this.$router.push('./home')
        },
    }
}
</script>

<style>

</style>